//Name: Final project
//Members: DungAnh-PhuongAnh-NhaUyen

#include "BookInfo.h"
#pragma once
class BookBorrowingInfo
{
private:
	char username[100];
	int status;
	int amount;//this will tell how many books the reader has returned so far
	typedef struct Book
	{
		typedef struct Datetime
		{
			int day;
			int month;
			int year;
		}Datetime;
		bool isUsing;
		char Name[100];
		char ISBN[14];
		Datetime Deadline;
		Datetime Dayreturn;
		Datetime Dayborrow;
	} Book;
	Book ReturnedBook[100];
	Book BorrowingBook[5];
	
	
public:
	void addInfo(char *username,int status,char *name,char* ISBN);
	void addInfo(int i,char *name,char* ISBN);
	void setDeadline(Book &b);
	void setDayborrow(Book &b);
	void setDayreturn(Book &b);
	void copyInfo(BookBorrowingInfo b);
	char* getUsername();
	int getStatus();
	void setisUsing(bool b,int i);
	int isFullBB();
	void showDeadline(int i);
	void showDayborrow(int i);
	void showDayborrowofReturnBook(int i);
	void showDayreturn(int i);
	void showBorrowingBook();
	void updateReturnedBook(int i);
	int returnBook(char* ISBN);
	int getAmount();
	void showReturnedBook();
};